aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/funds/[id]/withdraw/+page.server.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-11-10 21:33:49 -0800
committerAdam Soltys <[email protected]>2023-11-11 00:04:22 -0800
commitae87f1d43c6d2cf34bd2ea6fd7b4d28af6d2aa91 (patch)
tree694efda287338a3b81c5d7d41328c9f2e30e5218 /src/routes/(app)/funds/[id]/withdraw/+page.server.js
parentefdbc67c17fab67bf3cdce448a30aa82f62c5212 (diff)
downloadcoinos-ui-ae87f1d43c6d2cf34bd2ea6fd7b4d28af6d2aa91.tar.gz
coinos-ui-ae87f1d43c6d2cf34bd2ea6fd7b4d28af6d2aa91.zip
nav update
Diffstat (limited to 'src/routes/(app)/funds/[id]/withdraw/+page.server.js')
-rw-r--r--src/routes/(app)/funds/[id]/withdraw/+page.server.js20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/routes/(app)/funds/[id]/withdraw/+page.server.js b/src/routes/(app)/funds/[id]/withdraw/+page.server.js
deleted file mode 100644
index 476149f2..00000000
--- a/src/routes/(app)/funds/[id]/withdraw/+page.server.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import { fail, json, redirect } from '@sveltejs/kit';
-import { fd, auth, post } from '$lib/utils';
-
-export async function load({ parent }) {
- let { user } = await parent();
- if (!user) throw redirect(307, '/register');
-}
-
-export const actions = {
- default: async ({ cookies, request }) => {
- let body = await fd(request);
- try {
- await post('/take', body, auth(cookies));
- } catch (e) {
- return fail(400, { message: e.message });
- }
-
- throw redirect(307, `/fund/${body.id}`);
- }
-};